<?php

namespace App\Models\Act;

use Illuminate\Database\Eloquent\Model;
use Laracasts\Presenter\PresentableTrait;

class Topic extends Model
{
	use PresentableTrait;

	protected $table = 'act_topics';

    protected $guarded = array();

    protected $presenter = 'App\Http\Presenters\TopicPresenter';    

    protected $with = ['joins'];
    /*
    参与用户
     */
    public function joins()
    {        
        return $this->hasMany('\App\Models\Act\Join');
    }

  
    /*所有题目*/
    public function questions()
    {
        return $this->hasMany('\App\Models\Act\Question');
    }
    

}